package com.java1412;

import com.java1412.entity.UserAddress;
import com.java1412.service.OrderService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;
import java.util.List;

/**
 * @author java1412
 * @create 2021-07-02 10:42
 */
public class ConsumerApplication {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:consumer.xml");
        ctx.start();
        OrderService orderService = ctx.getBean(OrderService.class);
        List<UserAddress> userAddresses = orderService.initOrder("111");
        userAddresses.forEach(System.out::println);
        System.in.read();
    }
}
